/*
 * BankCardListItem.java
 * business
 *
 * Created by SunDing on 2017/2/21.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.displaylistitem;

import android.app.Activity;
import android.content.Context;
import android.view.View;

import com.yidiandao.business.R;
import com.yidiandao.business.data.bean.Goods;
import com.yidiandao.business.ui.assetabout.bankcardinfo.BankCardInfoActivity;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;
import com.yidiandao.business.ui.widget.listview.viewholder.BankCardHolder;
import com.yidiandao.business.utils.ImageLoader;
import com.yidiandao.business.utils.UIUtils;

/**
 * 我的银行卡
 */
public class BankCardListItem extends DisplayListItem<BankCardHolder, Goods> {

    public BankCardListItem(Goods s) {
        super(s);
    }

    @Override
    public void onShow(final Context context, BankCardHolder holder) {
        //背景
        ImageLoader.loadActiveImageFitXY(context, holder.mIvBgImage, "");
        //logo
        ImageLoader.loadImage(context, holder.mIvBankLogo, "");
        //银行名
        holder.mTvBankName.setText("");
        //类型  储蓄卡  信用卡
        holder.mTvBankType.setText("");
        //卡号
        holder.mTvBankNumber.setText(UIUtils.getString(R.string.bank_card_number, "7989"));

        holder.mRelayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //查看银行卡信息
                BankCardInfoActivity.actionStart((Activity) context);
            }
        });

    }

    @Override
    public String getDisplayItemTag() {
        return BankCardListItem.class.getSimpleName();
    }

    @Override
    public Class<BankCardHolder> getViewHolderClazz() {
        return BankCardHolder.class;
    }
}
